<template>
  <div class="container">
    <xy-table
      :columns="columns"
      :api="api"
      :addFormDTO="addFormDTO"
      :on-edit="onEdit"
    >
      <template #view> <span></span></template>
    </xy-table>
  </div>
</template>

<script>
import API from "../../plugins/api";
export default {
  data() {
    return {
      api: new API("api/role/GetList"),
      columns: {
        // id: "5",
        role_type: "",
        role_name: "企业用户（管理员）",
        roletypeName: "",
      },
      addFormDTO: {
        role_name: "",
        roletypeName: "",
      },
    };
  },
  created() {
    // this.api.getList = "GetRoleList";
  },
  methods: {
    onEdit(row) {
      console.log(row);
      this.$router.push({
        path: "/edit_role",
        query: { id: row.id },
      });
    },
  },
};
</script>

<style lang="less" scoped></style>
